package com.gimi.cloud.bbp.dao.dao.log.provider;

import com.gimi.cloud.bbp.dto.log.LogJPushDTO;

public class LogJPushDaoProvider {
	
	public String getLogJPushList(LogJPushDTO dto) {
		StringBuffer sql = new StringBuffer("SELECT * FROM log_jpush WHERE 1=1");
		if (dto.getPushStatus() != null) {
			sql.append(" AND push_status = #{pushStatus}");
		}
		if (dto.getPushSendType() != null) {
			sql.append(" AND push_send_type = #{pushSendType}");
		}
		if (dto.getStartTime() != null) {
			sql.append(" AND add_time >= #{startTime}");
		}
		if (dto.getEndTime() != null) {
			sql.append(" AND add_time <= #{endTime}");
		}
		return sql.toString();
	}

}
